﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SystemCenterSoa.DtoModel.Common;
using SystemCenterSoa.DtoModel.Customer;
using SystemCenterSoa.IRepository.CustomerManger;
using SystemCenterSoa.PoModel.Customer;

namespace SystemCenterSoa.Service.CustomerManager
{
    public class CustomerService
    {
        private CustomerIRepository _customerIRepository;

        public CustomerService(CustomerIRepository customerIRepository)
        {
            _customerIRepository = customerIRepository;
            
        }

        public bool CustomerAdd(CustomerPo info)
        {
            return _customerIRepository.CustomerAdd(info);
        }

        public bool FirstPartyAdd(FirstPartyPo info)
        {
            return _customerIRepository.FirstPartyAdd(info);
        }

        public bool SatisfactionSurveyAdd(SatisfactionSurveyPo info)
        {
            return _customerIRepository.SatisfactionSurveyAdd(info);
        }

        //public List<StateCityPo> GetStateCity(int id)
        //{
        //    var list = _customerIRepository.GetStateCity(id);
        //    return list;
        //}

        public List<FirstPartyPo> GetFirstParty()
        {
            var list = _customerIRepository.GetFirstParty();
            return list;
        }

        public List<SatisfactionSurveyPo> GetSatisfactionSurveyPos()
        {
            var list = _customerIRepository.GetSatisfactionSurveyPos();
            return list;
        }

        public FirstPartyPo FanFirst(int id)
        {
            var list = _customerIRepository.FanFirst(id);
            return list;
        }

        public bool DeleFirst(int id)
        {
            return _customerIRepository.DeleFirst(id);
        }

        public bool UpdateFirst(FirstPartyPo info)
        {
            return _customerIRepository.UpdateFirst(info);
        }

        public bool Deleman(int id)
        {
            return _customerIRepository.Deleman(id);
        }

        public SatisfactionSurveyPo ManCha(int id)
        {
            return _customerIRepository.ManCha(id);
        }

        public bool Updateman(SatisfactionSurveyPo info)
        {
            return _customerIRepository.Updateman(info);
        }

        public List<China> GetChina(int id)
        {
            return _customerIRepository.GetChina(id);
        }

        public PagerResult<CustomerDto> GetAllInfo(SearchModel searchModel)
        {
            return _customerIRepository.GetAllInfo(searchModel);
        }

        public CustomerPo FanCustomer(int id)
        {
            return _customerIRepository.FanCustomer(id);
        }

        public List<FirstPartyPo> Fanjia(int id)
        {
            return _customerIRepository.Fanjia(id);
        }

        public List<SatisfactionSurveyPo> Fanman(int id)
        {
            return _customerIRepository.Fanman(id);
        }

        public bool CustomerUpdate(CustomerPo info)
        {
            return _customerIRepository.CustomerUpdate(info);
        }


        public bool Dele(string ids)
        {
            return _customerIRepository.Dele(ids);
        }

        public List<CustomerPo> Tian(int id)
        {
            return _customerIRepository.Tian(id);
        }
    }
}
